Wireless communication by portable wireless communication devices is carried out in accordance with wireless communication standards, for example, the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard and the Bluetooth (trademark) standard. In general, in those wireless communication standards, a user manually selects one of wireless communication devices from a list displayed on a display, to thereby select a wireless communication device to serve as a communication partner. However, in order for the user to manually select the wireless communication device from the list as described above, the user is required to have previous knowledge of identification information, for example, a service set identifier (SSID) and a name, on the wireless communication device that is to serve as the communication partner.
In a wireless communication system disclosed in Patent Literature 1, bearing information on two electronic devices, which is acquired by electronic compasses, is used to determine whether or not to establish a connection via wireless communication between the two electronic devices. In this way, a user can perform an intuitive operation of matching the orientations of the electronic devices, to thereby establish the connection via wireless communication between the two electronic devices even without previous knowledge of the identification information on the wireless communication device that is to serve as the communication partner.